package com.smart.stock.module.maindata.services;

import com.smart.stock.module.GlobalConstant;
import com.smart.stock.module.maindata.entity.StockPriceToday;
import com.smart.stock.module.spider.jobSpiderWeb.board.BoardIndustrySpider;
import com.smart.stock.module.spider.jobSpiderWeb.board.BoardIndustrySpider2;
import com.smart.stock.module.spider.jobSpiderWeb.today.StockPriceTodaySpider;
import com.smart.stock.module.spider.util.TradingDateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class StockPriceTodayService {
    @Autowired
    private TradingDateUtil tradingDateUtil;
    @Autowired
    private MongoTemplate template;
    @Autowired
    private StockPriceTodaySpider stockPriceTodaySpider;

    public void refreshData(String cookieStr){
        if (StringUtils.isNotBlank(cookieStr)) {
            GlobalConstant.URL_THS_INDUSTRY_COOKIESTR = cookieStr;
        }

        stockPriceTodaySpider.run();
    }



}
